<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>回执</title>
<!--公共样式开始-->
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/reset.css" />
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/common.css" />
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Plugins/FontAwesome/css/font-awesome.min.css" />
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Plugins/FontAwesome/css/font-awesome-ie7.min.css" />
<![endif]-->
<!--公共样式结束-->
<!--页面样式开始-->
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/page_printpage.css" />

<!--页面样式结束-->
<script type="text/javascript" src="{$NOW_THEME_URL}/Assets/Js/jquery.min.js"></script>
<style>
body{
	line-height:1.3;
}
.print_table2 tbody tr td{
	/*border-bottom:1px solid #ccc;*/
	padding:5px 0px;
}
body{
	position:relative;
}
.mask{
	position:absolute;
	width:100%;
	height:100%;
	
	display:none;
	z-index:3;
}
.fj_ico i{
	cursor:pointer;
	font-size:14px;
}
[class^="icon-"]:before, [class*=" icon-"]:before{
	cursor:pointer;
}
 .fj_ico{
	position:relative;
}
.fj_ico .fj_content{
	position:absolute;
	padding:20px 30px;
	width:300px;
	box-shadow:0px 2px 4px rgba(0,0,0,0,2);
	display:none;
	z-index:10;
	background:#fff;
	line-height:25px;
}
</style>
</head>
<body style="overflow-y:scroll;">
<div class="mask"></div>
	<table class="print" width="90%" border="0" cellpadding="0" cellspacing="0">
		<thead>
			<tr>
				<td class="title">K.K.RABBIT FOOD DELIVERY SERVICE</td>
			</tr>
			<tr>
				<td class="website">www.kkrabbit.com.cn</td>
			</tr>
			<tr>
				<td class="telephone">Tel:400-020-1717&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fax:(021)5239-9205</td>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td>
					<table class="print_table1" width="100%" border="0" cellpadding="0" cellspacing="0">
						<thead>
							<tr>
								<th>Delivery To:<br/>客户名称：</th>
								<td>{$detail.username}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									<span id="total"><notempty name="total">（总积分：{$total}）<else />新客户</notempty></span>
								</td>
								<th class="odd">Order No:<br/>订单号：</th>
								<td>{$detail.orderno}</td>
							</tr>
							<tr>
								<td colspan="2"></td>
								<td colspan="2" class="space"></td>
							</tr>
							<tr>
								<th>Mobile:<br/>电话：</th>
								<td id="mobile">{$detail.mobile}</td>
								<th class="odd">Order Date:<br/>订单日期：</th>
								<td>{$detail.addtime|date="m/d",###}</td>
							</tr>
							<tr>
								<td colspan="2"></td>
								<td colspan="2" class="space"></td>
							</tr>
							<tr>
								<th>Address:<br/>地址：</th>
								<td id="address">
									{$detail.address}
									<notempty name="detail.cnaddress">
										<br/>{$detail.cnaddress}
									</notempty>
								</td>
								<th class="odd">Order Time:<br/>订餐时间：</th>
								<td>{$detail.addtime|date="m/d H:i",###}</td>
							</tr>
							<tr>
								<td colspan="2"></td>
								<td colspan="2" class="space"></td>
							</tr>
							<tr>
								<th>&nbsp;</th>
								<td>&nbsp;</td>
								<th class="odd">Target Delivery:<br/>送餐时间：</th>
								<td>
									{$detail.sdltime|date="m/d H:i",###}&nbsp;&nbsp;~&nbsp;&nbsp;{$detail.edltime|date="m/d H:i",###}
									<eq name='detail.isyuding' value='1'><em style="font-size:16px;background-color:red;color:#FFF">（预定餐）</em></eq>
								</td>
							</tr>
						</thead>
						<tfoot>
							<tr>
								<th>Restaurant:</th>
								<td class="fj_ico">
									<notempty name='outlet.information'>
										<i class="icon-caret-down"></i>
										<div class="fj_content">{$outlet.information}</div>
									</notempty>
									{$outlet.entitle}
								</td>
								<th class="odd">餐厅：</th>
								<td class='fj_ico'>
									<notempty name='outlet.information'>
										<i class="icon-caret-down"></i>
										<div class="fj_content">{$outlet.information}</div>
									</notempty>
									{$outlet.title}
								</td>
							</tr>
						</tfoot>
					</table>
					<table class="print_table2" width="100%" border="0" cellpadding="0" cellspacing="0">
						<thead>
							<tr>
								<th>Item ID<br/>编号</th>
								<th></th>
								<th>Item<br/>菜名</th>
								<th>Property<br/>属性</th>
								<th>Quantity<br/>数量</th>
								<th>Unit Price<br/>单价</th>
								<th>Comment<br/>要求</th>
								<th class="right">Price<br/>总价</th>
							</tr>
						</thead>
						<tbody>
						
						<volist name="dlist" id="v">
							<eq name='v.flag' value='dishes'>
								<tr>
									<td>{$v.pno}</td>
									<td class="fj_ico">
										<notempty name='v.information'>
										<i class=" icon-caret-down" style="cursor:pointer;"></i>
										<div class="fj_content">{$v.information}</div>
										<else />&nbsp;</notempty>
									</td>
									<td>{$v.title}<br/>{$v.entitle}</td>
									<td>
										<notempty name="v.attr">
											<volist name="v.attr" id="m">
												<!-- <span class="entitle">{$m.title}（{$m.entitle}）：</span> -->
												<volist name="m.config" id="n" mod="2">
													<span>{$n.title}（{$n.entitle}）<notempty name='n.num'>（{$n.num}份/portion）</notempty></span>　
													<eq name="mod" value="1"><br/></eq>
												</volist>
											</volist>
										</notempty>
									</td>
									<td align="center">{$v.amount}</td>
									<td>￥{$v.price}</td>
									<td>{$v.content}</td>
									<td class="right">￥{$v.total}</td>
								</tr>
							</eq>
						</volist>
						<tr>
							<td colspan="5"></td>
							<td colspan="3" class="total right" style="border-top:2px solid #000">
								<span>SubTotal/小计：</span>￥{$detail['dishesfee']+$detail['cardfee']|number_format=2}</td>
						</tr>
						<tr>
							<td colspan="8" style="border-top:1px solid #000"></td>
						</tr>
						<php>$num=0;</php>
						<volist name="dlist" id="v">
							<eq name='v.flag' value='drink'>
								<tr>
									<td>{$v.pno}</td>
									<td class="fj_ico">
										<notempty name='v.information'>
										<i class=" icon-caret-down" style="cursor:pointer;"></i>
										<div class="fj_content">{$v.information}</div>
										<else />&nbsp;</notempty>
									</td>
									<td>{$v.title}<br/>{$v.entitle}</td>
									<td>
										<notempty name="v.attr">
											<volist name="v.attr" id="m">
												<span class="entitle">{$m.title}（{$m.entitle}）：</span>
												<volist name="m.config" id="n">
													<span>{$n.title}（{$n.entitle}）<notempty name='n.num'>（{$n.num}份/portion）</notempty></span>　
												</volist>
												<br/>
											</volist>
										</notempty>
									</td>
									<td align="center">{$v.amount}</td>
									<td>￥{$v.price}</td>
									<td>{$v.content}</td>
									<td class="right">￥{$v.total}</td>
								</tr>
								<php>$num++;</php>
							</eq>
						</volist>
						<gt name='num' value='0'>
							<tr>
								<td colspan="5"></td>
								<td colspan="3" class="total right" style="border-top:2px solid #000">
									<span>SubTotal/小计：</span>￥{$detail.drinkfee}
								</td>
							</tr>
						</gt>	
					</table>
					<table class="print_table3" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td>Memo:<br/>备注：</td>
							<td>
								<notempty name="detail.content">客人备注：{$detail.content}</notempty><br/>
								<notempty name="detail.remark">客服备注：{$detail.remark}</notempty>
							</td>
							<td class="dercoration">Restaurant Total:<br/>餐厅金额</td>
							<td class="right">￥{$detail['dishesfee']+$detail['cardfee']|number_format=2}</td>
						</tr>
						<tr>
							<td></td>
							<td rowspan="5" style="width:65%;">
								 <div>
								 	<php>$m=1;</php>
								 	<notempty name="detail.isdrink">
								 	  {$m}、获赠的饮品：<php>$drink = C('IS_SEND_DRINK');echo $drink[$detail['isdrink']]['zh-cn'].'（'.$drink[$detail['isdrink']]['en-us'].'）';</php><br/>
								 	  <php>$m=2;</php>
								 	</notempty>
								 	<eq name='detail.isinvoice' value='1'>
								 		{$m}、发票：{$detail.invoice_title}<br/>
								 		<php>$m=3;</php>
								 	</eq>
									<volist name="orderbak" id="v">
										{$m}、{$v.remark}
										<php>$m++;</php><br/>
									</volist>
								 </div>
							</td>
							<td class="dercoration">Adjustment:<br/>调整费：</td>
							<td class="right">￥{$detail.b_price}</td>
						</tr>
						<tr>
							<td></td>
							<td class="dercoration">Service Charge:<br/>服务费：</td>
							<td class="right">￥{$detail.shipfee}</td>
						</tr>
						<tr>
							<td></td>
							<td class="dercoration">Wine & Drink:<br/>酒饮料： </td>
							<td class="right">￥{$detail.drinkfee}</td>
						</tr>
						<tr>
							<td></td>
							<td class="dercoration">Discount:<br/>优惠：</td>
							<td class="right">-￥{$detail.cardfee}</td>
						</tr>
						<tr id='settlefee'>
							<td></td>
							<td class="dercoration">Discount:<br/>结算金额：</td>
							<td class="right">￥{$detail.settlefee}</td>
						</tr>
						<tfoot>
							<tr>
								<td></td>
								<td></td>
								<td class="o_total dercoration">Order Total:<br/>总价：</td>
								<td class="right o_total">￥{$detail['orderfee']+$detail['b_price']|number_format=2}</td>
							</tr>
						</tfoot>
					</table>
				</td>
			</tr>
		</tbody>
		<tfoot>
			<tr>
				<td class="print_foot">
				<a class="orderprint printorder">打印</a>
				<a href="{:U('Order/printpdf','id='.$detail['id'])}" class="orderprint printpdf">导出pdf</a>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{:date("Y-m-d H:i:s")}</td> 
			</tr>
		</tfoot>
	</table>
</body>
<script type="text/javascript">
$(function(){
	$('.printorder').on('click',function(){
		$('#mobile').html('***********');
		$('#address').html('***************************');
		$('#settlefee').remove();
		$('#total').remove();
		$('.orderprint').each(function(){
			$(this).remove();
		});
		window.print();
	});
	
	$('.fj_ico i').on('click',function(){
		$(this).siblings('.fj_content').show();
		$('.mask').show();
	});
	$('.mask').on('click',function(){
			$('.fj_content').hide();
			$(this).hide();
	});
	
	$('.icon-caret-up').on('click',function(){
		$(this).next('div').show();
	});
})
</script>
</html>
